﻿@using Covenant.Models.Listeners
@model Listener
@{
    Layout = "_ListenerLayout";
    ViewData["Title"] = "Listener";
    IEnumerable<HttpProfile> Profiles = ViewBag.Profiles;
    IEnumerable<HostedFile> HostedFiles = ViewBag.HostedFiles;
}

<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pb-2 mb-3">
    <h1 class="h2">Listener: <span class="text-primary">@Html.DisplayFor(model => model.Name)</span></h1>
</div>

@if (Model.ListenerType.Name == "HTTP")
{
    HttpListener l = (HttpListener)Model;
    await Html.RenderPartialAsync("_InteractHttpListener", l);
}
else if (Model.ListenerType.Name == "Bridge")
{
    BridgeListener l = (BridgeListener)Model;
    await Html.RenderPartialAsync("_InteractBridgeListener", l);
}

@section Scripts {
    <script type="text/javascript">$(document).ready(function () {
            $("#info-tab").tab('show');
        });</script>
}